/**
 * (●'◡'●) Created by xxy on 2017/7/18 16:04
 */

var http = require("http")
var fs = require("fs");
var url = require("url");

http.createServer(function (req,res) {
    var txt = fs.readFileSync("../data/data.json");

    var obj = url.parse(req.url,true).query;
    console.log(obj)

    var name = obj.cb || "Xwudi";

    res.end(name+"("+txt+")");
}).listen(3456);
console.log("http://localhost:3456");